package com.aaa.service.scl.impl;

import com.aaa.dao.scl.QuestionSclDao;
import com.aaa.entity.PageSortEntity;
import com.aaa.entity.scl.QuestionScl;
import com.aaa.service.scl.QuestionSclService;
import com.github.pagehelper.PageHelper;
import org.springframework.stereotype.Service;


import javax.annotation.Resource;
import java.util.List;

/**
 * (QuestionScl)表服务实现类
 *
 * @author makejava
 * @since 2022-09-01 13:23:29
 */
@Service("questionSclService")
public class QuestionSclServiceImpl implements QuestionSclService {
    @Resource
    private QuestionSclDao questionSclDao;

    @Override
    public Integer save(QuestionScl questionScl) {
        Integer save = questionSclDao.save(questionScl);
        return save;
    }

    @Override
    public Integer deleteById(Integer id) {
        Integer integer = questionSclDao.deleteById(id);
        return integer;
    }

    @Override
    public Integer deleteBatch(int[] id) {
        Integer integer = questionSclDao.deleteBatch(id);
        return integer;
    }

    @Override
    public Integer update(QuestionScl questionScl) {
        Integer update = questionSclDao.update(questionScl);
        return update;
    }

    @Override
    public List<QuestionScl> queryAllScl(PageSortEntity pageSortEntity, QuestionScl questionScl) {
        PageHelper.startPage(pageSortEntity.getPage(), pageSortEntity.getLimit());
        List<QuestionScl> questionSclList = questionSclDao.queryAllScl(questionScl);
        return questionSclList;
    }

    @Override
    public List<QuestionScl> queryAll() {
        List<QuestionScl> questionScls = questionSclDao.queryAll();
        return questionScls;
    }

    @Override
    public List<QuestionScl> queryMhtAll() {
        List<QuestionScl> questionMhts = questionSclDao.queryMhtAll();
        return questionMhts;
    }

    @Override
    public List<QuestionScl> querySasAll() {
        List<QuestionScl> questionSass = questionSclDao.querySasAll();
        return questionSass;
    }

    @Override
    public List<QuestionScl> querySdsAll() {
        List<QuestionScl> questionSdss = questionSclDao.querySdsAll();
        return questionSdss;
    }

    @Override
    public List<QuestionScl> queryFpaAll() {
        List<QuestionScl> questionSdss = questionSclDao.queryFpaAll();
        return questionSdss;
    }


    @Override
    public int repetitionName(QuestionScl questionScl) {
        int i = questionSclDao.repetitionName(questionScl);
        return i;
    }
}
